﻿Imports System.Data
Imports Cls_Common
Imports VSModel

Partial Class FrontEnd_Control_QuangCao_LeftNews
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Dim lstNode As New DataSet
            lstNode.ReadXml(MapPath("../../../xml/SliderLeft.xml"))
            With rptMenu
                .DataSource = lstNode.Tables("Node")
                .DataBind()
            End With
        End If
    End Sub
    Protected Sub rptMenu_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptMenu.ItemDataBound
        Dim hplTitle As HyperLink = CType(e.Item.FindControl("hplTitle"), HyperLink)
        hplTitle.NavigateUrl = MainDomain & e.Item.DataItem("URL").ToString
        hplTitle.Text = e.Item.DataItem("Title")
    End Sub
End Class
